home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Apple Shared Library Manager / ASLM Examples / Inspector / Sources / Inspector.r < prev    next >
Encoding:
Text File  |  1996-11-19  |  5.2 KB  |  292 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        Inspector.r
  3.  
  4.     Contains:    Resources for the TInspector class
  5.  
  6.     Copyright:    © 1991-1994 by Apple Computer, Inc., all rights reserved.
  7.  
  8. */
  9.  
  10. #include "SysTypes.r"
  11. #include "Types.r"
  12. #include "InspectorCommon.h"
  13.  
  14.  
  15. resource 'STR#' (kInspectorErrStrings, purgeable) {
  16.     {
  17.     "Can't stack windows because the WindowStackerLibrary could not be found"
  18.     }
  19. };
  20.  
  21.  
  22. /* we use an MBAR resource to conveniently load all the menus */
  23.  
  24. resource 'MBAR' (rMenuBar) {
  25.     { mApple, mFile, mEdit, mWindows, mCommands, mTests };
  26. };
  27.  
  28. resource 'MENU' (mApple) {
  29.     mApple, textMenuProc,
  30.     0b1111111111111111111111111111101,    /* disable dashed line, enable About and DAs */
  31.     enabled, apple,
  32.     {
  33.         "About Inspector…",
  34.             noicon, nokey, nomark, plain;
  35.         "-",
  36.             noicon, nokey, nomark, plain
  37.     }
  38. };
  39.  
  40. resource 'MENU' (mFile) {
  41.     mFile, textMenuProc,
  42.     0b0000000000000000000000000000010,    /* enable Quit only, program enables others */
  43.     enabled, "File",
  44.     {
  45.         "Close",
  46.             noicon, "W", nomark, plain;
  47.         "Quit",
  48.             noicon, "Q", nomark, plain
  49.     }
  50. };
  51.  
  52. resource 'MENU' (mEdit) {
  53.     mEdit, textMenuProc,
  54.     0b0000000000000000000000000000000,    /* disable everything, program does the enabling */
  55.     enabled, "Edit",
  56.      {
  57.         "Undo",
  58.             noicon, "Z", nomark, plain;
  59.         "-",
  60.             noicon, nokey, nomark, plain;
  61.         "Cut",
  62.             noicon, "X", nomark, plain;
  63.         "Copy",
  64.             noicon, "C", nomark, plain;
  65.         "Paste",
  66.             noicon, "V", nomark, plain;
  67.         "Clear",
  68.             noicon, nokey, nomark, plain
  69.     }
  70. };
  71.  
  72. resource 'MENU' (mWindows) {
  73.     mWindows, textMenuProc,
  74.     0b1111111111111111111111111101111,    /* almost everything enabled */
  75.     enabled, "Windows",
  76.      {
  77.         "Stack",
  78.             noicon, nokey, nomark, plain;
  79.         "Refresh",
  80.             noicon, "F", nomark, plain;
  81.         "Refresh All",
  82.             noicon, "ƒ", nomark, plain;
  83.         "Home",
  84.             noicon, "H", nomark, plain;
  85.         "-",
  86.             noicon, nokey, nomark, plain
  87.     }
  88. };
  89.  
  90. resource 'MENU' (mCommands) {
  91.     mCommands, textMenuProc,
  92.     0b1111111111111111111111111111111,    /* enable everything */
  93.     enabled, "Commands",
  94.      {
  95.         "Register Folder",
  96.             noicon, nokey, nomark, plain;
  97.         "Unregister Folder",
  98.             noicon, nokey, nomark, plain;
  99.         "-",
  100.             noicon, nokey, nomark, plain;
  101.         "Register File",
  102.             noicon, nokey, nomark, plain;
  103.         "Unregister File",
  104.             noicon, nokey, nomark, plain;
  105.         "-",
  106.             noicon, nokey, nomark, plain;
  107.         "Reload ASLM",
  108.             noicon, "R", nomark, plain;
  109.         "Unload ASLM",
  110.             noicon, "U", nomark, plain;
  111.         "-",
  112.             noicon, nokey, nomark, plain;
  113.         "Goto SimpleProgram",
  114.             noicon, "G", nomark, plain;
  115.         "-",
  116.             noicon, nokey, nomark, plain;
  117.         "Trace On",
  118.             noicon, "T", nomark, plain;
  119.         "Trace Off",
  120.             noicon, nokey, nomark, plain;
  121.     }
  122. };
  123.  
  124. resource 'MENU' (mTests) {
  125.     mTests, textMenuProc,
  126.     0b1111111111111111111111111101111,    /* almost everything enabled */
  127.     enabled, "Tests",
  128.      {
  129.         "Verbose",
  130.             noicon, nokey, nomark, plain;
  131.         "Debug",
  132.             noicon, nokey, nomark, plain;
  133.         "Preload Test Class",
  134.             noicon, nokey, nomark, plain;
  135.         "Allow Pool to Grow",
  136.             noicon, nokey, nomark, plain;
  137.         "-",
  138.             noicon, nokey, nomark, plain;
  139.         "Run All Tests",
  140.             noicon, nokey, nomark, plain;
  141.         "-",
  142.             noicon, nokey, nomark, plain
  143.     }
  144. };
  145.  
  146.  
  147. /* this ALRT and DITL are used as an About screen */
  148.  
  149. resource 'ALRT' (rAboutAlert, purgeable) {
  150.     {40, 20, 160, 330 }, rAboutAlert, {
  151.         OK, visible, silent;
  152.         OK, visible, silent;
  153.         OK, visible, silent;
  154.         OK, visible, silent
  155.     };
  156. };
  157.  
  158. resource 'DITL' (rAboutAlert, purgeable) {
  159.     { /* array DITLarray: 5 elements */
  160.         /* [1] */
  161.         {88, 224, 108, 304},
  162.         Button {
  163.             enabled,
  164.             "OK"
  165.         },
  166.         /* [2] */
  167.         {8, 8, 24, 304 },
  168.         StaticText {
  169.             disabled,
  170.             "ASLM Test Application"
  171.         },
  172.         /* [3] */
  173.         {32, 8, 48, 237},
  174.         StaticText {
  175.             disabled,
  176.             "Copyright © 1991-1993 Apple Computer"
  177.         },
  178.         /* [4] */
  179.         {56, 8, 72, 136},
  180.         StaticText {
  181.             disabled,
  182.             "Brought to you by:"
  183.         },
  184.         /* [5] */
  185.         {80, 24, 112, 220},
  186.         StaticText {
  187.             disabled,
  188.             "The ASLM Team"
  189.         }
  190.     }
  191. };
  192.  
  193.  
  194. resource 'WIND' (rDocWindow, purgeable) {
  195.     {64, 60, 314, 460},
  196.     zoomDocProc, invisible, goAway, 0x0, "untitled"
  197. };
  198.  
  199. /*
  200. /* -------------------------------------------------------------------------- */
  201. /*    Dialog for choosing the folder to register or unregister */
  202. /* -------------------------------------------------------------------------- */
  203.  
  204. resource 'DLOG' (rFolderDialog) {
  205.     {0, 0, 210, 348},
  206.     dBoxProc,
  207.     invisible,
  208.     noGoAway,
  209.     0x0,
  210.     rFolderDialog,
  211.     ""
  212. };
  213.  
  214. resource 'DITL' (rFolderDialog) {
  215.     {    /* array DITLarray: 13 elements */
  216.         /* [1] */
  217.         {163, 256, 181, 336},
  218.         Button {
  219.             enabled,
  220.             "Open"
  221.         },
  222.         /* [2] */
  223.         {0, 699, 80, 717},
  224.         Button {
  225.             enabled,
  226.             "Hidden"
  227.         },
  228.         /* [3] */
  229.         {188, 256, 206, 336},
  230.         Button {
  231.             enabled,
  232.             "Cancel"
  233.         },
  234.         /* [4] */
  235.         {39, 232, 59, 347},
  236.         UserItem {
  237.             disabled
  238.         },
  239.         /* [5] */
  240.         {68, 256, 86, 336},
  241.         Button {
  242.             enabled,
  243.             "Eject"
  244.         },
  245.         /* [6] */
  246.         {93, 256, 111, 336},
  247.         Button {
  248.             enabled,
  249.             "Drive"
  250.         },
  251.         /* [7] */
  252.         {62, 11, 208, 229},
  253.         UserItem {
  254.             enabled
  255.         },
  256.         /* [8] */
  257.         {62, 228, 208, 245},
  258.         UserItem {
  259.             enabled
  260.         },
  261.         /* [9] */
  262.         {124, 252, 125, 340},
  263.         UserItem {
  264.             disabled
  265.         },
  266.         /* [10] */
  267.         {0, 660, 101, 756},
  268.         StaticText {
  269.             disabled,
  270.             ""
  271.         },
  272.         /* [11] */
  273.         {138, 256, 156, 336},
  274.         Button {
  275.             enabled,
  276.             "Select"
  277.         },
  278.         /* [12] */
  279.         {0, 3, 16, 300},
  280.         StaticText {
  281.             disabled,
  282.             "Select a shared library folder:"
  283.         },
  284.         /* [13] */
  285.         {18, 40, 36, 204},
  286.         Button {
  287.             enabled,
  288.             "Select Current Folder"
  289.         }
  290.     }
  291. };
  292.